//
//  PlayerView.swift
//  MyVideo
//
//  Created by han on 2021/4/21.
//

import UIKit
import AVFoundation

class PlayerView: UIView {
    
    var player: AVPlayer? {
        set { playerLayer.player = newValue }
        get { playerLayer.player }
    }
    
    var playerLayer: AVPlayerLayer {
        layer as! AVPlayerLayer
    }
    
    override class var layerClass: AnyClass {
        return AVPlayerLayer.self
    }
}
